// var path = "${pageContext.request.contextPath }";
$(function () {
    var twoLevel;
    var threeLevel;
//    查找二级分类
    var categoryName2_Aux = $("#categoryName2_Aux").val();
    $.ajax({
        type: "GET",
        url: "/findCategoryName3",
        data: {"id": categoryName2_Aux},
        dataType: "json",
        success: function (data) {
            for (var i = 0; i < data.length; i++) {
                if (categoryName2_Aux != null && categoryName2_Aux != undefined && data[i].id == categoryName2_Aux) {
                    twoLevel = data[i].categoryName;
                    $("#categoryName2").html(twoLevel);
                }
            }
        },
        error: function (data) {
            alert("对不起，加载失败")
        }
    });

    //    查找三级分类
    var categoryName3_Aux = $("#categoryName3_Aux").val();
    $.ajax({
        type: "GET",
        url: "/findCategoryName3",
        data: {"id": categoryName3_Aux},
        dataType: "json",
        success: function (data) {
            for (var i = 0; i < data.length; i++) {
                if (categoryName3_Aux != null && categoryName3_Aux != undefined && data[i].id == categoryName3_Aux) {
                    threeLevel = data[i].categoryName;
                    $("#categoryName3").html(threeLevel);
                }
            }
        },
        error: function (data) {
            alert("对不起，加载失败")
        }
    });
})